﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace cognysWCF
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IService1
    {
        #region QoR

        [OperationContract]
        void saveQor(ResultQoR qor);

        [OperationContract]
        List<QOR> getQorQuestions();

        [OperationContract]
        List<ResultQoR> getQorRegDates(Guid person);

        [OperationContract]
        List<ResultQoR> getAllResultsQor();

        [OperationContract]
        List<ResultQoR> getUserSingleResultQoR(string date, Guid personID);  
 
        #endregion //QoR

        #region PRiC

        [OperationContract]
        void AddPricResult(ResultPRiC pric);

        [OperationContract]
        List<PRIC> getPricQuestions();

        [OperationContract]
        List<ResultPRiC> getPricRegDates(Guid person);

        [OperationContract]
        List<ResultPRiC> getUserSingleResultPric(string date, Guid personID);

        #endregion //PRiC

        #region Memory

        [OperationContract]
        List<ResultMemory> getMemoryResult(Guid personID);

        [OperationContract]
        string getMemoryAvg();

        [OperationContract]
        string getMemoryTop();

        [OperationContract]
        void AddMemoryResult(ResultMemory memory);

        #endregion //Memory

        #region Stroop

        [OperationContract]
        void AddStroopResult(ResultStroop stroop);

        [OperationContract]
        List<ResultStroop> getStroopResult(Guid personID);

        [OperationContract]
        string getStroopAvg();

        [OperationContract]
        string getStroopTop();

        #endregion //Stroop

        #region TMT

        [OperationContract]
        void addTmtResult(ResultTMT tmt);

        [OperationContract]
        string getTMTAvg();

        [OperationContract]
        List<ResultTMT> getTMTResult(Guid PersonID);

        [OperationContract]
        string getTMTTop();

        #endregion //TMT

        #region Person

        [OperationContract]
        void editPerson(Person person);

        [OperationContract]
        List<Person> getPersons(string name);

        [OperationContract]
        Person getPerson(Guid id);

        [OperationContract]
        List<Person> getPersonsByNameAndPersonal(string FirstName, string LastName, string Personal);

        [OperationContract]
        void SavePerson(Person p);

        #endregion //Person

        #region Testgroup

        [OperationContract]
        List<Testgroup> getTestGroup();

        [OperationContract]
        void createTestGroup(Testgroup testGroup);

        [OperationContract]
        Testgroup getTestGroupID(int id);

        [OperationContract]
        void RemoveTestGroup(Testgroup testGroup);

        [OperationContract]
        void editTestGroup(Testgroup testGroup);

        [OperationContract]
        void addPersonToTestgroup(Guid personID, int testgroupID);

        [OperationContract]
        void deletePersonFromTestgroup(Guid personID, int testgroupID);

        [OperationContract]
        List<Testgroup> getTestgroupMemberhip(Guid personID);

        [OperationContract]
        List<Testgroup> getTestgroupNotMember(Guid personID);

        #endregion //Testgroup

        #region Baseline/resultstate

        [OperationContract]
        Baseline getBaseline(Guid person);

        [OperationContract]
        ResultState getResultState(Guid person);

        [OperationContract]
        void AddBaseLine(Baseline bl);

        [OperationContract]
        void AddResultState(ResultState rs);

        [OperationContract]
        void editResultState(Guid person, string type, int value);

        [OperationContract]
        void editBaseLine(Guid person, string type, int value);

        #endregion //Baseline/resultstate
        [OperationContract]
        string GetData(int value);

        [OperationContract]
        CompositeType GetDataUsingDataContract(CompositeType composite);

    }


    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
    }
}
